
<div class="container">

<?php if(validation_errors()){error(validation_errors()); } if($error){error($error);}?>
<?php 
	$attrbutes = array(
		'class' => 'form-horizontal',
		'id' => 'form_add'
	);
	echo form_open('account/register',$attrbutes);
?>
	<div class="contorl-group row">
	
		
		<div class="control-group">
              <label for='username' class="control-label"><s>*</s>用户名</label>
              <div class="controls">
				<input type="text" value="<?php echo set_value('username');?>" name="username" data-rules="{required:true}"  aria-disabled="false"/>
              </div>
        </div>
		
		<div class="control-group">
              <label for='password' class="control-label"><s>*</s>用户密码</label>
              <div class="controls">
				<input type="password" id='p1' value="<?php echo set_value('password');?>"  name="password" data-rules="{required:true}"  aria-disabled="false"/>
              </div>
        </div>
		
		<div class="control-group">
              <label for='repassword' class="control-label"><s>*</s>重复密码</label>
              <div class="controls">
				<input type="password" value="" name="repassword"  data-rules="{required:true,equalTo:'#p1'}"aria-disabled="false"/>
              </div>
        </div>
		
		<div class="control-group">
              <label for='email' class="control-label"><s>*</s>用户邮箱</label>
              <div class="controls">
				<input type="email" name="email" value="<?php echo set_value('email');?>" data-rules="{required:true,email:true}"  aria-disabled="false"/>
              </div>
        </div>
		
		<?php
		if($captchaconf['register_need']){
		?>
		 <div class="control-group">
			  <label for='captcha' class='control-label'><s>*</s>验证码 : </label>
			  <div class="controls" >
				  <input type="text"  name='captcha' placeholder="captcha" data-rules="{required:true}"> <span id='captcha'><?php echo $captcha;?></span>
			  </div>
			
		 </div>
		 <script src="<?php echo base_url().$this->config->item('public'); ?>assets/js/common.js"></script>
		<script>

			$('#captcha').click(function (){
				get_captcha($(this),'app');
			});
		</script>
		<?php
			}
		 
		 ?>
		
		<div class="actions-bar  centered">
			<input type="submit" class='btn btn-primary' checked="checked" value="确认添加"/>
			<input type="reset" class='btn' checked="checked" value="重置"/>
		</div>
		
	</div>
	

<?php echo form_close();?>
</div>
<script type='text/javascript'>

var Form = BUI.Form;
new Form.Form({
	srcNode:'#form_add'
}).render();


</script>